package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller//相当于@Component IOD注册bean类
public class FirstController {
    @RequestMapping("/firstController")
    public String sayHello() {
        System.out.println("访问FirstController");
        return "success";//自动拼接/WEB_INF/page/success.jsp
    }
}
